/**  
 * All rights Reserved, Designed By www.tydic.com
 * @Title:  AccountService.java   
 * @Package com.axin.service   
 * @Description:    TODO(用一句话描述该文件做什么)   
 * @author: axin     
 * @date:   2019年4月2日 下午10:04:05   
 * @version V1.0 
 * @Copyright: 2019 www.hao456.top Inc. All rights reserved. 
 */
package com.axin.service;

import java.util.List;

import com.axin.common.entity.ApiToken;
import com.axin.common.entity.DataGridResult;
import com.axin.common.entity.response.Accounts;
import com.axin.common.entity.response.Balance;
import com.axin.common.entity.response.BalanceBean;
import com.axin.common.exception.AccountLockException;
import com.axin.common.exception.ApiException;

/**   
 * @Description: 账户相关 
 * @ClassName:  AccountService
 * @author:  Axin 
 * @date:   2019年4月2日 下午10:04:05   
 * @Copyright: 2019 www.hao456.top Inc. All rights reserved. 
 */
public interface AccountService {
	
	/**现货账户*/
	public static final String TYPE_SPOT = "spot";
	/**杠杆账户*/
	public static final String TYPE_MARGIN = "margin";
	/**OTC账户*/
	public static final String TYPE_OTC = "otc";
	/**点卡账户*/
	public static final String TYPE_POINT = "point";
	
	/**余额类型：交易余额*/
	public static final String BALANCE_TYPE_TRADE = "trade";
	/**余额类型：冻结余额*/
	public static final String BALANCE_TYPE_FROZEN = "frozen";
	
	
	/**
	 * 获取账户信息
	 * @Description: TODO  
	 * @Title: accounts   
	 * @return List<Accounts>
	 * @throws
	 */
	List<Accounts> getAccounts(ApiToken token) throws ApiException,Exception;
	
	
	/**
	 * 查询指定类型账户的id 
	 * @throws Exception 
	 * @throws ApiException 
	 * @Title: getAccountsByType   
	 * @param token
	 * @return Integer
	 * @throws
	 */
	Integer getAccountsByType(ApiToken token,String type) throws ApiException, AccountLockException,Exception;
	
	/**
	 * 查询列表
	 * @Description: TODO  
	 * @Title: getBalance   
	 * @param token
	 * @param id
	 * @return
	 * @throws ApiException
	 * @throws Exception Balance
	 * @throws
	 */
	Balance<List<BalanceBean>> getBalance(ApiToken token,Integer id)throws ApiException,Exception;
	
	
	DataGridResult getBalanceList(ApiToken token,Integer id)throws ApiException,Exception; 
	
	/**
	 * 获得指定账户id的余额
	 * @Description: TODO  
	 * @Title: getBalanceByAccountId   
	 * @param token
	 * @param id
	 * @param type
	 * @return
	 * @throws ApiException
	 * @throws Exception BalanceBean
	 * @throws
	 */
	BalanceBean getBalanceByAccountId(ApiToken token,Integer id,String type,String currency)throws ApiException, AccountLockException,Exception;
	
	
	
	
	
	
	
	
	

}
